package io.renren.modules.headmaster.controller;

import io.renren.common.utils.R;
import io.renren.modules.common.entity.CensusEntity;
import io.renren.modules.headmaster.service.MasterCensusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.Date;


/**
 * @author guijing
 * @email sunlightcs@gmail.com
 * @date 2022-03-28 20:16:37
 */
@RestController
@RequestMapping("headmaster/census")
public class MasterCensusController {

    @Autowired
    MasterCensusService masterCensusService;

    /**
     * 班主任获取打卡情况接口
     */
    @RequestMapping("/sector/{date}")
    public R sector(@PathVariable("date") Date date) {
        CensusEntity censusEntity = masterCensusService.sectorList(date);

        return R.ok().put("census", censusEntity);
    }


}
